<style>
    .disable_project .select-icon {
        box-sizing: content-box;
    }

    .disable_project .no-data {
        height: 117px;
    }

    .disable_project .no-data span {
        margin: 10px auto 0;
        height: 37px;
    }

    .disable_project .pagination .pagination-con {
        float: left;
        margin-top: 5px;
    }

    .disable_project .container {
        padding: 0 20px;
    }

    .disable_project .ml60 {
        margin-left: 60px;
    }

    .disable_project .checkbox label, .checkbox span {
        width: 50px;
    }
</style>
<div class="ui-dialog-content disable_project" style="width: 900px;">
    <div class="row clearfix">
        <div class="container">
            <div class="table-header clearfix">
                <div class="search clearfix">
                    <span class="fl lh30">项目授权记录列表</span>

                    <span class="fl lh30 ml60">授权状态：</span>
                    <div style="width:100px" class="fl mr20">
                        <div ui-combobox data="Page.searchErpFields" text-field="name" value-field="value"
                             ng-model="Page.query.status"></div>
                    </div>
                    <button class="fr btn ml20"
                            ng-disabled="!Page.getDisabled().length"
                            ui-dialog="批量取消禁用"
                            ui-dialog-before-show="beforeCancelDisableReason(null,$data,$dialog,$dialogScope)"
                            ui-dialog-url="${require('./cancel_disable_reason.html?url')}"
                            ui-dialog-ok="cancelDisabled($data, Page.getItems())">批量取消禁用
                    </button>
                    <button class="fr btn ml20"
                            ng-disabled="!Page.getEnabled().length"
                            ui-dialog="批量禁用"
                            ui-dialog-url="${require('./disable_reason.html?url')}"
                            ui-dialog-before-show="beforeDisableReason(null,$data,$dialog,$dialogScope)"
                            ui-dialog-ok="disabled($data, Page.items)">批量禁用
                    </button>
                    <button class="fr btn" ng-click="Page.search(1)">搜索</button>
                    <input type="text" class="input-text fr" placeholder="项目名称"
                           ng-model="Page.query.projName"
                           ng-enter="Page.search(1)" style="width:200px">
                </div>
            </div>
            <div class="table-responsive mt10" id="project_manager_table_id">
                <div class="table-thead">
                    <table class="table">
                        <colgroup>
                            <col style="width: 50px"/>
                            <col style="width: 100px"/>
                            <col style="width: 100px"/>
                            <col style="width: 60px"/>
                            <col style="width: 240px"/>
                            <col style="width: 162px"/>
                            <col style="width: 80px"/>
                            <col/>
                        </colgroup>
                        <thead>
                        <tr>
                            <th height="34">
                                <input type="checkbox" ui-checkbox="序号" ng-change="Page.updateCheckAll()"
                                       ng-model="Page.checkAll">
                            </th>
                            <th>项目名称</th>
                            <th>已绑应用</th>
                            <th>授权状态</th>
                            <th>合同</th>
                            <th>租期</th>
                            <th>禁用日期</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                    </table>
                </div>
                <div class="table-tbody" style="height: 300px;overflow-x: hidden;overflow-y: auto;">
                    <table width="100%" class="table table-hover">
                        <colgroup>
                            <col style="width: 50px"/>
                            <col style="width: 100px"/>
                            <col style="width: 100px"/>
                            <col style="width: 60px"/>
                            <col style="width: 240px"/>
                            <col style="width: 162px"/>
                            <col style="width: 80px"/>
                            <col/>
                        </colgroup>
                        <tbody>
                        <tr ng-repeat="project in Page.items">
                            <td height="45" ng-cloak>
                                <label class="checkbox">
                                    <input type="checkbox" value="1" name="cb1"
                                           ng-model="project.checked" ng-change="Page.check()"
                                           class="ng-pristine ng-untouched ng-valid">
                                    <span>{{$index + 1}}</span>
                                </label>
                            </td>
                            <td ng-cloak>{{project.ProjName}}</td>
                            <td ng-cloak>{{project.applicationName}}</td>
                            <td ng-cloak>{{project.status|authorizeStatus}}</td>
                            <td ng-cloak>{{project.contractName}}</td>
                            <td ng-cloak>
                                {{project.contractBeginOn + '至' + project.contractEndOn}}
                            </td>
                            <td ng-cloak>
                                {{project.disable_time}}
                            </td>
                            <td>
                                <ul class="options">
                                    <li>
                                        <a href="javascript:;" class="c-orange"
                                           ng-hide="project.is_disable"
                                           ui-dialog="禁用"
                                           ui-dialog-url="${require('./disable_reason.html?url')}"
                                           ui-dialog-before-show="beforeDisableReason(project,$data,$dialog,$dialogScope)"
                                           ui-dialog-ok="disabled($data, project)">禁用</a>
                                        <a href="javascript:;" class="c-orange"
                                           ng-show="project.is_disable"
                                           ui-dialog="取消禁用"
                                           ui-dialog-before-show="beforeCancelDisableReason(project,$data,$dialog,$dialogScope)"
                                           ui-dialog-url="${require('./cancel_disable_reason.html?url')}"
                                           ui-dialog-ok="cancelDisabled($data, project)">取消禁用</a>
                                        <a href="javascript:;" class="c-orange"
                                           ui-dialog="查看禁用记录"
                                           ui-dialog-before-show="beforeDisableReasonDetail(project,$data,$dialog,$dialogScope)"
                                           ui-dialog-url="${require('./disable_reason_detail.html?url')}">查看</a>
                                    </li>

                                </ul>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                    <div class="no-data" style="height: 300px;" ng-if="Page.items && !Page.items.length">
                        <span>暂无数据</span>
                    </div>
                </div>
            </div>
            <div ui-pagination page-index="Page.pagination.params.pageIndex"
                 page-size="Page.pagination.params.pageSize" total="Page.pagination.total"
                 changed="Page.pagination.change($pageIndex)"></div>
        </div>
    </div>
</div>
